package com.xuecheng.media.agent.impl;

import com.xuecheng.common.domain.code.CommonErrorCode;
import com.xuecheng.common.domain.response.RestResponse;
import com.xuecheng.common.exception.ExceptionCast;
import com.xuecheng.media.agent.ContentApiAgent;

/**
 * <p> </p>
 *
 * @Description:
 */
public class ContentApiAgentFallBack implements ContentApiAgent {


    /**
     * Sentinel降级方法
     * @param mediaId - 媒资ID
     * @return - 熔断信息
     */
    @Override
    public RestResponse getById(Long mediaId) {
        RestResponse<Object> validfail = RestResponse.validfail(CommonErrorCode.E_999982);
        return validfail;
    }

    @Override
    public void removeById(Long mediaId) {
        ExceptionCast.cast(CommonErrorCode.E_999982);
    }
}
